import { defHttp } from '../http'
import type { CommonAPI } from '../model/_utils'
/**创建自签证书 */
export const createSelfCertApi: CommonAPI<'/api/self_ca', 'post'> = data =>
  defHttp.post('/api/self_ca', { data })
/**删除自签证书 */
export const deleteSelfCertApi: CommonAPI<'/api/self_ca', 'delete'> = data =>
  defHttp.delete('/api/self_ca', { data })
/**获取自签证书 */
export const getSelfCertApi: CommonAPI<'/api/self_ca', 'get'> = params =>
  defHttp.get('/api/self_ca', { params })
/**获取申请自签证书 */
export const applySelfCertApi: CommonAPI<
  '/api/self_ca/obtain',
  'post'
> = data => defHttp.post('/api/self_ca/obtain', { data })
/**查询自签证书 */
export const getSelfCertListApi: CommonAPI<
  '/api/self_ca/query',
  'get'
> = params => defHttp.get('/api/self_ca/query', { params })
/**申请自签证书 */
export const renewSelfCaApi: CommonAPI<'/api/self_ca/renew', 'post'> = data =>
  defHttp.post('/api/self_ca/renew', { data })
